package com.huawang.ecolink.apps.common.eums;

public enum DesignVisibilityEnum {
    PRIVATE("private", "VisibilityKind-protected"),
    PROTECTED("protected", "VisibilityKind-protected"),
    PUBLIC("public","VisibilityKind-public"),
    PACKAGE("package","VisibilityKind-package");

    private final String modelicaValue;
    private final String designValue;

    DesignVisibilityEnum(String modelicaValue, String designValue) {
        this.modelicaValue = modelicaValue;
        this.designValue = designValue;
    }

    public String getModelicaValue() {
        return modelicaValue;
    }

    public String getDesignValue() {
        return designValue;
    }
    //通过ID获取枚举值
    public static DesignVisibilityEnum getByModelicaValue(String modelicaValue) {
        if(modelicaValue == null){
            return null;
        }
        for(DesignVisibilityEnum v : values()) {
            if(v.modelicaValue.equals(modelicaValue)) {
                return v;
            }
        }
        return null;
    }

}
